package model.AttentionHouse.controller;


import model.AttentionHouse.entity.Attentionhouse;
import model.AttentionHouse.service.IAttentionhouseService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


/**
 * Created by Sunshine、宸 on 2019/6/25.
 */

@RestController
public class AttentionHouseController {

    @Autowired
    private IAttentionhouseService iAttentionhouseService;

    //根据id查找所有信息
    @GetMapping("/attention/{informationId}")
    public Attentionhouse attentionhouse(@PathVariable("informationId") Integer informationId){
        Attentionhouse attentionhouse=iAttentionhouseService.findById(informationId);
        return attentionhouse;
    }

}
